﻿<%@ Page Title="" Language="C#" MasterPageFile="~/System/MasterPage_Base.master" AutoEventWireup="true" CodeFile="NewsList.aspx.cs" Inherits="System_News_NewsList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    新闻管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <table style="width: 100%;">
        <tr>
            <td>
                <table>
                    <tr>
                        <td>标题：
                        </td>
                        <td>
                            <asp:TextBox ID="txt_Title" runat="server" CssClass="TextBox" Width="160"></asp:TextBox>
                            &nbsp;&nbsp;
                        </td>
                        <td>
                            <asp:Button ID="btn_Search" runat="server" Text="查询" CssClass="Button"
                                OnClick="btn_Search_Click" />
                            <asp:Button ID="btn_Add" runat="server" Text="增加" PostBackUrl="NewsModify.aspx" CssClass="Button" />

                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table class="DataList" border="0" style="margin-top: 10px;">
                    <tr>
                        <th>新闻类型
                        </th>
                        <th>新闻标题
                        </th>
                        <th>发布时间
                        </th>
                        <th>作者
                        </th>
                        <th>是否启用
                        </th>
                        <th>操作
                        </th>
                    </tr>
                    <asp:Repeater ID="RepeaterList" runat="server"
                        OnItemCommand="RepeaterList_ItemCommand"
                        OnItemDataBound="RepeaterList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%# Eval("NewsTypeName")%>
                                </td>
                                <td>
                                    <%# Eval("Title")%>
                                </td>
                                <td style="text-align: center;">
                                    <%#SetShortDateTime(Eval("ReleaseDate").ToString())%>
                                </td>
                                <td style="text-align: center;">
                                    <%#Eval("Author") %>
                                </td>
                                <td style="text-align: center;">
                                    <asp:Label ID="ValidText" runat="server" Text="启用"></asp:Label>
                                    <asp:LinkButton ID="BtnOperate" runat="server" CommandName="Valid" CommandArgument='<%#Eval("NewsId") %>'>修改</asp:LinkButton>
                                </td>
                                <td style="text-align: center;">
                                    <a href='NewsModify.aspx?Action=Update&Id=<%#Eval("NewsId") %>'>编辑</a>
                                    <asp:LinkButton ID="lbtn_Delete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("NewsId") %>' OnClientClick="return isDelete()">删除</asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <div class="Paginate">
                    <webdiyer:AspNetPager ID="PaginateCtl" runat="server" OnPageChanged="PaginateCtl_PageChanged" />
                </div>

            </td>
        </tr>
    </table>
</asp:Content>
